﻿<Application x:Class="MyFinanceManager.PC.App"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
    StartupUri="WindowNewStyle.xaml">
    <Application.Resources>
        <!--NEW-->
        <Style x:Key="ButtonStyleYellow" TargetType="{x:Type Button}" >
            <Setter Property="Template" Value="{DynamicResource myTemplate}" />
            <Setter Property="Background" Value="{DynamicResource VistaTaskbarYellow}"/>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Foreground" Value="Yellow"/>
                    <Setter Property="BitmapEffect">
                        <Setter.Value>
                            <OuterGlowBitmapEffect GlowColor="White" GlowSize="4"/>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="ButtonStyleBlue" TargetType="{x:Type Button}" >
            <Setter Property="Template" Value="{DynamicResource myTemplate}" />
            <Setter Property="Background" Value="{DynamicResource VistaTaskbarBlue}"/>
            <Setter Property="Foreground" Value="White"/>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Foreground" Value="Yellow"/>
                    <Setter Property="BitmapEffect">
                        <Setter.Value>
                            <OuterGlowBitmapEffect GlowColor="White" GlowSize="4"/>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="ButtonStyleBlack" TargetType="{x:Type Button}" >
            <Setter Property="Template" Value="{DynamicResource myTemplate}" />
            <Setter Property="Background" Value="{DynamicResource VistaTaskbarBlack}"/>
            <Setter Property="Foreground" Value="White"/>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Foreground" Value="Yellow"/>
                    <Setter Property="BitmapEffect">
                        <Setter.Value>
                            <OuterGlowBitmapEffect GlowColor="White" GlowSize="4"/>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="ButtonStyleOrange" TargetType="{x:Type Button}" >
            <Setter Property="Template" Value="{DynamicResource myTemplate}" />
            <Setter Property="Background" Value="{DynamicResource VistaTaskbarOrange}"/>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Foreground" Value="Yellow"/>
                    <Setter Property="BitmapEffect">
                        <Setter.Value>
                            <OuterGlowBitmapEffect GlowColor="White" GlowSize="4"/>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="ButtonStyleGreen" TargetType="{x:Type Button}" >
            <Setter Property="Template" Value="{DynamicResource myTemplate}" />
            <Setter Property="Background" Value="{DynamicResource VistaTaskbarGreen}"/>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Foreground" Value="Yellow"/>
                    <Setter Property="BitmapEffect">
                        <Setter.Value>
                            <OuterGlowBitmapEffect GlowColor="White" GlowSize="4"/>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
        <ControlTemplate x:Key="myTemplate" TargetType="{x:Type ButtonBase}">
            <Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" SnapsToDevicePixels="True" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" RecognizesAccessKey="True"/>
            </Microsoft_Windows_Themes:ButtonChrome>
        </ControlTemplate>
        <LinearGradientBrush x:Key="VistaTaskbarYellow" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFECE288" Offset="0.0136986301369863"/>
            <GradientStop Color="#FFEAE596" Offset="0.054"/>
            <GradientStop Color="#FFEADF7C" Offset="0.491"/>
            <GradientStop Color="#FFF8BE04" Offset="0.518"/>
            <GradientStop Color="#FFFAF9EC" Offset="0.027"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VistaTaskbarOrange" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFDF8836" Offset="0.0136986301369863"/>
            <GradientStop Color="#FFEAB396" Offset="0.071"/>
            <GradientStop Color="#FFDEA67B" Offset="0.491"/>
            <GradientStop Color="#FFF86F04" Offset="0.518"/>
            <GradientStop Color="#FFFAF9EC" Offset="0.027"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VistaTaskbarGreen" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFC1FFBD" Offset="0.0136986301369863"/>
            <GradientStop Color="#FFC4EAC1" Offset="0.054"/>
            <GradientStop Color="#FF79D674" Offset="0.491"/>
            <GradientStop Color="#FF55A450" Offset="0.518"/>
            <GradientStop Color="#FFF4F4F4" Offset="0.027"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VistaTaskbarBlue" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF84B1EE" Offset="0.0136986301369863"/>
            <GradientStop Color="#FFC6DFFF" Offset="0.054"/>
            <GradientStop Color="#FF3C80DA" Offset="0.491"/>
            <GradientStop Color="#FF044AA7" Offset="0.518"/>
            <GradientStop Color="#FFF4F4F4" Offset="0.027"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VistaTaskbarBlack" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF575757" Offset="0.0136986301369863"/>
            <GradientStop Color="#FF999997" Offset="0.071"/>
            <GradientStop Color="#FF5E5E5C" Offset="0.491"/>
            <GradientStop Color="#FF000000" Offset="0.518"/>
            <GradientStop Color="#FF9D9D9D" Offset="0.027"/>
        </LinearGradientBrush>
        <!--/NEW-->
        <SolidColorBrush x:Key="LabelHighlightBrush" Color= "#FF292929" />
        <SolidColorBrush x:Key="CaptionBrush" Color= "#FFFFFFFF" />
        <SolidColorBrush x:Key="BorderBrush" Color="#FFB8B8B8" />
        <LinearGradientBrush x:Key="LabelBrush" StartPoint="0, 0" EndPoint="0,1">
            <GradientStop Color="#FFDADADA" Offset="0" />
            <GradientStop Color="#FF3F3F3F" Offset="1" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ButtonNormalBrush" StartPoint="0, 0" EndPoint="0,1">
            <GradientStop Color="#FF818181" Offset="0.005" />
            <GradientStop Color="#FF2D2D2D" Offset="0.43" />
            <GradientStop Color="#FF7A7A7A" Offset="0.985" />
            <GradientStop Color="#FF181717" Offset="0.445" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ButtonPressedBrush" StartPoint="0, 0" EndPoint="0,1">
            <GradientStop Color="#FF80FF69" Offset="0" />
            <GradientStop Color="#FF43AF2F" Offset="0.405" />
            <GradientStop Color="#FF38A325" Offset="0.415" />
            <GradientStop Color="#FF7CFE64" Offset="1" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ButtonSelectedBrush" StartPoint="0, 0" EndPoint="0,1">
            <GradientStop Color="#FF6982FF" Offset="0" />
            <GradientStop Color="#FF3650CE" Offset="0.405" />
            <GradientStop Color="#FF2B3FA5" Offset="0.415" />
            <GradientStop Color="#FF647EFE" Offset="1" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ButtonHoverBrush" StartPoint="0, 0" EndPoint="0,1">
            <GradientStop Color="#FFF3C072" Offset="0" />
            <GradientStop Color="#FFF3C072" Offset="0.40625" />
            <GradientStop Color="#FFF39302" Offset="0.425" />
            <GradientStop Color="#FFF3C072" Offset="1" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="BrushExpenses" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFFFFFF" Offset="0.5"/>
            <GradientStop Color="#FFFDD0D0" Offset="1"/>
            <GradientStop Color="#FFFDD0D0" Offset="0"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="BrushEarnings" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFFFFFF" Offset="0.5"/>
            <GradientStop Color="#FFD3FFD5" Offset="1"/>
            <GradientStop Color="#FFD3FFD5" Offset="0"/>
        </LinearGradientBrush>
        <ControlTemplate x:Key="OutlookTab" TargetType="{x:Type TabControl}">
            <ControlTemplate.Resources>
                <!-- This style sets the default template for a TabItem -->
                <Style TargetType="{x:Type TabItem}">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type TabItem}">
                                <!-- This defines the look of the individual TabItems -->
                                <Grid Background="{TemplateBinding Background}" MinHeight="32" SnapsToDevicePixels="True">
                                    <Line Stroke="{StaticResource BorderBrush}" VerticalAlignment="Top" Stretch="Fill" X2="1" SnapsToDevicePixels="True" />
                                    <ContentPresenter Margin="5,0,5,0" TextBlock.FontFamily="Tahoma" TextBlock.FontSize="8pt" TextBlock.FontWeight="Bold" TextBlock.Foreground="{StaticResource CaptionBrush}" Content="{TemplateBinding Header}" VerticalAlignment="Center"/>
                                </Grid>
                                <!-- These triggers control the background and text colour of the Outlook bar buttons when the are selected and/or hovered over -->
                                <ControlTemplate.Triggers>
                                    <MultiTrigger>
                                        <MultiTrigger.Conditions>
                                            <Condition Property="IsSelected" Value="False" />
                                            <Condition Property="IsMouseOver" Value="False" />
                                        </MultiTrigger.Conditions>
                                        <Setter Property="Background" Value="{StaticResource ButtonNormalBrush}" />
                                    </MultiTrigger>
                                    <MultiTrigger>
                                        <MultiTrigger.Conditions>
                                            <Condition Property="IsSelected" Value="False" />
                                            <Condition Property="IsMouseOver" Value="True" />
                                        </MultiTrigger.Conditions>
                                        <Setter Property="Background" Value="{StaticResource ButtonHoverBrush}" />
                                    </MultiTrigger>
                                    <Trigger Property="IsSelected" Value="True">
                                        <Setter Property="Background" Value="{StaticResource ButtonSelectedBrush}" />
                                    </Trigger>
                                    <Trigger Property="IsSelected" Value="False">
                                        <Setter Property="TextElement.Foreground" Value="{StaticResource CaptionBrush}" />
                                    </Trigger>
                                    <MultiTrigger>
                                        <MultiTrigger.Conditions>
                                            <Condition Property="IsSelected" Value="True" />
                                            <Condition Property="IsMouseOver" Value="True" />
                                        </MultiTrigger.Conditions>
                                        <Setter Property="Background" Value="{StaticResource ButtonPressedBrush}" />
                                    </MultiTrigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </ControlTemplate.Resources>
            <!-- This is the template for the TabControl itself -->
            <Border BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" SnapsToDevicePixels="True" >
                <DockPanel>
                    <!-- This is the host panel that contains the tab items -->
                    <StackPanel DockPanel.Dock="Bottom" IsItemsHost="True" />
                    <!-- This is the label that appears at the top of the TabControl -->
                    <Grid DockPanel.Dock="Top" MinHeight="28" Background="{StaticResource ButtonNormalBrush}" SnapsToDevicePixels="True">
                        <TextBlock FontFamily="Tahoma" Foreground="{StaticResource CaptionBrush}" VerticalAlignment="Center" Margin="5,0" FontSize="18" FontWeight="Bold" ><Run Text="MyFinanceManager"/></TextBlock>
                        <Line Stroke="{StaticResource BorderBrush}" VerticalAlignment="Bottom" X2="1" Stretch="Fill"/>
                    </Grid>
                    <!-- This is the selected content pane that appears in the Outlook Bar -->
                    <ContentPresenter Content="{TemplateBinding SelectedContent}" />
                </DockPanel>
            </Border>
        </ControlTemplate>
    </Application.Resources>
</Application>
